package com.xmb.wcapi.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xmb.wcapi.dto.InventoryAgoSaDTO;
import com.xmb.wcapi.entity.InventoryAgo;
import com.xmb.wcapi.mapper.InventoryAgoMapper;
import com.xmb.wcapi.service.InventoryAgoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class InventoryAgoServiceImpl extends ServiceImpl<InventoryAgoMapper, InventoryAgo> implements InventoryAgoService{

    @Autowired
    private InventoryAgoMapper agoMapper;

    @Override
    public IPage<InventoryAgo> selectInfoPage(Page<?> page, InventoryAgoSaDTO ago) {
        QueryWrapper<InventoryAgo> ew = new QueryWrapper<>();
        ew.in("lngPositionID",ago.getLngs());
        ew.in("strGoodsCode",ago.getStrGoodsCodes());
        ew.orderByAsc("strGoodsCode");
        return agoMapper.selectInfoPage(page,ew);
    }

}
